let t = require;
let e = module
let o = e.exports;
o.default = e.exports;

'use strict';
console.log("start");
var _n53,
    i =
        (this && this.__extends) ||
        ((_n53 = function n(t, e) {
            return (_n53 =
                Object.setPrototypeOf ||
                ({
                    __proto__: []
                }
                    instanceof Array &&
                    function (t, e) {
                        t.__proto__ = e;
                    }) ||
                function (t, e) {
                    for (var o in e) {
                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                    }
                })(t, e);
        }),
            function (t, e) {
                function o() {
                    this.constructor = t;
                }
                _n53(t, e),
                    (t.prototype =
                        null === e ?
                            Object.create(e) :
                            ((o.prototype = e.prototype), new o()));
            }),
    r =
        (this && this.__decorate) ||
        function (t, e, o, n) {
            var i,
                r = arguments.length,
                a =
                    r < 3 ?
                        e :
                        null === n ?
                            (n = Object.getOwnPropertyDescriptor(e, o)) :
                            n;
            if (
                'object' ==
                (typeof Reflect === 'undefined' ?
                    'undefined' :
                    typeof (Reflect)) &&
                'function' == typeof Reflect.decorate
            )
                a = Reflect.decorate(t, e, o, n);
            else
                for (var s = t.length - 1; s >= 0; s--) {
                    (i = t[s]) &&
                        (a = (r < 3 ? i(a) : r > 3 ? i(e, o, a) : i(e, o)) || a);
                }
            return r > 3 && a && Object.defineProperty(e, o, a), a;
        };
Object.defineProperty(o, '__esModule', {
    value: !0
}),
    (o.BuyMoneyPanel = void 0);
var a = t('UIPanel'),
    s = t('UIViewRes'),
    c = t('UILayer'),
    l = t('ComUtils'),
    u = t('SoundMrg'),
    h = t('UIMrg'),
    p = t('ConstantCfg'),
    f = t('GameSDK'),
    d = t('BattleMrg'),
    g = t('UmaSdkHelper'),
    _ = t('LangCfg'),
    y = cc._decorator,
    C = y.ccclass,
    m =
        (y.property,
            (function (t) {
                function e() {
                    return (null !== t && t.apply(this, arguments)) || this;
                }
                return (
                    i(e, t),
                    (e.prototype.onInit = function () {
                        t.prototype.onInit.call(this),
                            (this._anim = this.view.getComponent(cc.Animation)),
                            (this._txtCount = l.default.getComponent(
                                cc.Label,
                                this.view,
                                'root/icon/txtCount'
                            )),
                            (this._txtCount.string = p.ConstantCfg.ins
                                .getValue(11)
                                .toString()),
                            l.default
                                .getNode(this.view, 'root/btnClose')
                                .on(
                                    cc.Node.EventType.TOUCH_END,
                                    this.onTouchCloseHandler,
                                    this
                                ),
                            l.default
                                .getNode(this.view, 'root/btnBuy')
                                .on(
                                    cc.Node.EventType.TOUCH_END,
                                    this.onTouchBuyHandler,
                                    this
                                );
                    }),
                    (e.prototype.onLang = function () {
                        var t = l.default.getComponent(
                            cc.Label,
                            this.view,
                            'root/txtTitle'
                        );
                        (t.string = _.LangCfg.ins.getContent(201300));
                        (l.default.getComponent(
                            cc.RichText,
                            this.view,
                            'root/txtDesc'
                        ).string = "补充银币",
                            _.LangCfg.ins.getContent(201301, {
                                n: p.ConstantCfg.ins.getValue(11)
                            }));

                        ((t = l.default.getComponent(
                            cc.Label,
                            this.view,
                            'root/btnBuy/Background/New Node/Label'
                        )).string = _.LangCfg.ins.getContent(201302));
                    }),
                    (e.prototype.onShow = function () {
                        t.prototype.onShow.call(this), this._anim.play('DefShowView');
                    }),
                    (e.prototype.onTouchBuyHandler = function () {
                        if (!l.default.getNode(this.view, 'root/btnBuy').getComponent(cc.Button).interactable) return;
                        u.SoundMrg.click(),
                            f.default.videoAdBuy(
                                4,
                                '银币',
                                this.onAdVideoHandler,
                                this
                            );
                        g.default.videoAdBuyMoney();
                    }),
                    (e.prototype.onAdVideoHandler = function () {
                        d.BattleMrg.ins.money += p.ConstantCfg.ins.getValue(11);
                        var t = this.getData();
                        t && t(), h.UIMrg.close(this);
                    }),
                    (e.RES = new s.UIViewRes(
                        'BuyMoneyView',
                        'Battle',
                        c.UILayer.PopLayer
                    )),
                    r([C('BuyMoneyPanel')], e)
                );
            })(a.default));
(o.BuyMoneyPanel = m), console.log("end");
module.exports = e.exports;